package com.sirg.config;import com.sirg.entity.ResultBean;import lombok.extern.slf4j.Slf4j;import org.springframework.web.bind.annotation.ControllerAdvice;import org.springframework.web.bind.annotation.ExceptionHandler;import org.springframework.web.bind.annotation.ResponseBody;/** * @Author: Sir-G * @Autograph: 安稳 * @Description: //TODO 全局异常处理类 * @Date: 2023-07-03 16:15:51 */@Slf4j@ControllerAdvicepublic class ExceptionAdvice {    @ExceptionHandler(value = Exception.class)    @ResponseBody    public ResultBean exception(Exception e) {        e.printStackTrace();        log.error(e.getMessage());        return ResultBean.error(ResultCodeEnum.INTERNAL_SERVER_ERROR.getCode(), e.getMessage());    }    @ExceptionHandler(value = SpringBootDrumException.class)    @ResponseBody    public ResultBean exception(SpringBootDrumException e) {        log.error(e.getMessage());        return ResultBean.error(e.getResultCodeEnum());    }}